<script setup lang="ts">
import Channels from './components/Channels.vue'
import News from './components/News.vue'
// import axios from 'axios'

/* //定义了后端返回数据的格式
interface IResponse<Y> {
  data: Y
  message: string
}
const getlist = async () => {
  const r = await axios.get<
    IResponse<{ chanels: { id: number; name: string }[] }>
  >('http://geek.itheima.net/v1_0/channels')
  console.log(r)
  r.data.data.chanels
}
getlist() */
</script>

<template>
  <!-- <h1>测试{{ channels.arr }}</h1> -->
  <Channels />
  <News />
</template>
